Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  the  Properties  of  an  OU  Object  

 Content of List the Properties of an OU Object.vbs
MD5 Hash: E21C1BADA64B51B948B5B1106BC3FC0D
' Description: Returns information found on the Object page in Active Directory Users and Computers for the Sales OU.


Set objContainer = GetObject _
("GC://ou=Sales,dc=NA,dc=fabrikam,dc=com")

strWhenCreated = objContainer.Get("whenCreated")
strWhenChanged = objContainer.Get("whenChanged")

Set objUSNChanged = objContainer.Get("uSNChanged")
dblUSNChanged = _
Abs(objUSNChanged.HighPart * 2^32 + objUSNChanged.LowPart)

Set objUSNCreated = objContainer.Get("uSNCreated")
dblUSNCreated = _
Abs(objUSNCreated.HighPart * 2^32 + objUSNCreated.LowPart)

objContainer.GetInfoEx Array("canonicalName"), 0
arrCanonicalName = objContainer.GetEx("canonicalName")

WScript.Echo "CanonicalName of object:"
For Each strValue in arrCanonicalName
WScript.Echo vbTab & strValue
Next
WScript.Echo

WScript.Echo "Object class: " & objContainer.Class & vbCrLf
WScript.Echo "whenCreated: " & strWhenCreated & " (Created - GMT)"
WScript.Echo "whenChanged: " & strWhenChanged & " (Modified - GMT)"
WScript.Echo VbCrLf
WScript.Echo "uSNChanged: " & dblUSNChanged & " (USN Current)"
WScript.Echo "uSNCreated: " & dblUSNCreated & " (USN Original)"

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a